from flask import Blueprint, render_template

from apps.blog.models import Article

roots_bp = Blueprint('roots', __name__)


@roots_bp.route('/')
def all_in_all(curr=1):
    article_pg = Article.query.paginate(page=curr, per_page=5)
    count = article_pg.total
    return render_template('blogs/index.html', **locals())

